import request from "@/api/request";
export default {
    questionList:(param,token)=>{
        return request({
            url:'/problem/list',
            method:'post',
            headers: {'token': token},
            data:param
        })
    },
    questionCategoryList:(token)=>{
      return request({
          url:'/category/list',
          method:'get',
          headers: {'token': token},
      })
    },
    getSubmissionRecord:(param,token)=>{
        return request({
            url:'/submission/getLatestSubmissions',
            method:'post',
            headers:{'token':token},
            data:param
        })
    },
    questionSave:(param,token)=>{
        return request({
            url:'/problem/save',
            method:'post',
            headers:{'token':token},
            data:param
        })
    },
    questionDelete:(param,token)=>{
        return request({
            url:'/problem/delete',
            method:'post',
            headers:{'token':token},
            data:param
        })
    },
    objectDelete:(param,token)=>{
        return request({
            url:'/objectiveQuestions/delete',
            method:'post',
            headers:{'token':token},
            data:param
        })
    },
    createObject:(param,token)=>{
        return request({
            url:'/objectiveQuestions/save',
            method:'post',
            headers:{'token':token},
            data:param
        })
    },
    objectiveList:(param,token)=>{
      return request({
          url:'/objectiveQuestions/list',
          method:'post',
          headers:{'token':token},
          data:param
      })
    },

    getCompany:(token)=>{
        return request({
            url:'/common/getCompany',
            method:'get',
            headers:{'token':token},
        })
    },

    getExamSubmissionRecord:(param,token)=>{
        return request({
            url:`/submission/getExamSubmissionRecord`,
            method:'post',
            headers:{'token':token},
            params:param
        })
    },
    getSolveProblemCount:(token)=>{
        return request({
            url:'/submission/getSolveProblemCount',
            method:'post',
            headers:{'token':token},
        })

    },







    questionDetail:(param,token)=>{
        return request({
            url:'/problem/detail',
            method:'post',
            headers: {'token': token},
            data:param
        })
    },
    questionSubmit:(param,token)=>{
        return request({
            url: 'submission/create',
            method:'post',
            headers: {'token': token},
            data:param
        })
    },
    getSubmissionResult:(param,token)=> {
        return request({
            url: 'submission/getLatestResult',
            method:'post',
            headers: {'token': token},
            data:param
        })
    },
    getCategories:(token)=>{
        return request({
            url: '/category/list',
            method:'get',
            headers: {'token': token},
        })
    },
    getTags:(token)=>{
        return request({
            url: '/common/getTag',
            method:'get',
            headers: {'token': token},
        })
    },




}